package com.hjm.judge.controller;

import com.hjm.api.domain.JudgeResult;
import com.hjm.api.domain.JudgeSubmitDTO;
import com.hjm.api.domain.UserQuestionResultVO;
import com.hjm.common.core.controller.BaseController;
import com.hjm.common.core.domain.Result;
import com.hjm.judge.service.IJudgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/judge")
public class JudgeController extends BaseController {

    @Autowired
    private IJudgeService judgeService;

    @PostMapping("/doJudge")
    public Result<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO) {
         return judgeService.doJudgeJavaCode(judgeSubmitDTO);
    }
}
